﻿<UserControl x:Class="BillsManager.Views.PrintReportView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:Controls="clr-namespace:BillsManager.Views.Controls"
             xmlns:Loc="clr-namespace:BillsManager.Localization;assembly=BillsManager.Localization"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             Width="Auto"
             Height="Auto"
             d:DesignHeight="400"
             d:DesignWidth="300"
             mc:Ignorable="d">

    <UserControl.Resources>
        <!--<ResourceDictionary Source="/BillsManager.Views;component/Dictionaries/Styles.xaml" />-->
        <ResourceDictionary Source="/BillsManager.Views;component/Themes/Themes.xaml" />
    </UserControl.Resources>

    <UserControl.Background>
        <Binding Source="{StaticResource View.Background}" />
    </UserControl.Background>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" MinWidth="75" />
            <ColumnDefinition Width="{StaticResource View.MarginSize}" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <!--
                <RowDefinition Height="Auto" />
                <RowDefinition Height="{StaticResource View.MarginSize}" />
            -->
            <RowDefinition />
            <RowDefinition Height="{StaticResource View.MarginSize}" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="{StaticResource View.MarginSize}" />
        </Grid.RowDefinitions>

        <!--
            <TextBlock Text="Header"
            HorizontalAlignment="Right"
            VerticalAlignment="Top" />
            <TextBox Text="{Binding Header}"
            Grid.Column="2"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Center" />
        -->

        <ScrollViewer Grid.Row="0"
                      Grid.ColumnSpan="3"
                      HorizontalScrollBarVisibility="Auto"
                      VerticalScrollBarVisibility="Auto">

            <Border Margin="0 10"
                    HorizontalAlignment="Center"
                    Background="White"
                    BorderBrush="#FFC3C3C3"
                    BorderThickness="1">
                <!--
                    <Border.Effect>
                    <DropShadowEffect Color="#FFC3C3C3"
                    Direction="0"
                    ShadowDepth="0"
                    BlurRadius="10" />
                    </Border.Effect>
                -->
                <ContentControl HorizontalAlignment="Center" Content="{Binding CurrentPage}" />
            </Border>

        </ScrollViewer>

        <Grid Grid.Row="2"
              Grid.ColumnSpan="3"
              HorizontalAlignment="Center"
              VerticalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="{StaticResource View.MarginSize}" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="{StaticResource View.MarginSize}" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="{StaticResource View.MarginSize}" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="{StaticResource View.MarginSize}" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="{StaticResource View.Region.Spacing.Medium}" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <Controls:PathButton Height="16"
                                 Command="{Binding GoToFirstPageCommand,
                                                   Mode=OneWay}"
                                 Data="{StaticResource LastLeftGeometry}"
                                 Style="{StaticResource PathButtonStyle}" />

            <Controls:PathButton Grid.Column="2"
                                 Height="16"
                                 Command="{Binding GoToPreviousPageCommand,
                                                   Mode=OneWay}"
                                 Data="{StaticResource Arrow.Left.Metro}"
                                 Style="{StaticResource PathButtonStyle}" />


            <TextBlock Grid.Column="4" VerticalAlignment="Center">
                <Run Text="{Binding CurrentPageNumber}" />
                <Run Text="/" />
                <Run Text="{Binding PageCount, Mode=OneWay}" />
            </TextBlock>
            <TextBlock Grid.Column="4"
                       VerticalAlignment="Center"
                       Visibility="Hidden">
                <Run Text="{Binding PageCount, Mode=OneWay}" />
                <Run Text="/" />
                <Run Text="{Binding PageCount, Mode=OneWay}" />
            </TextBlock>

            <Controls:PathButton Grid.Column="6"
                                 Height="16"
                                 Command="{Binding GoToNextPageCommand,
                                                   Mode=OneWay}"
                                 Data="{StaticResource Arrow.Right.Metro}"
                                 Style="{StaticResource PathButtonStyle}" />

            <Controls:PathButton Grid.Column="8"
                                 Height="16"
                                 Command="{Binding GoToLastPageCommand,
                                                   Mode=OneWay}"
                                 Data="{StaticResource LastRightGeometry}"
                                 Style="{StaticResource PathButtonStyle}" />

            <Button Grid.Column="10"
                    MinWidth="80"
                    Command="{Binding PrintCommand,
                                      Mode=OneWay}"
                    Content="{Loc:Translate Print}" />

        </Grid>

    </Grid>
</UserControl>